package com.ys.num2.Controller;

import com.ys.num2.Entity.Employee;
import com.ys.num2.Service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class EmployeeController {
    @Autowired
    private EmployeeService employeeService;

    /**
     * 需求：获取员工的信息
     * 1.返回员工信息对象
     * 2.调用员工服务层实现
     */
    @GetMapping("/emp")
    public Employee getEmpObj() {
        return employeeService.getEmpObj();
    }
}
